package model.altarica_fields;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;

public class Event {
	
	private String event;
	private ArrayList<String> event_vector;
	private Hashtable<String,Event> lessEvents;
	
	private static final Event epsilon = new Event(" ");

	
	public static Event getEpsilon() {
		
		return epsilon;
	}
	
	public Event(String event) {
		
		this.event = event;
		this.event_vector = new ArrayList<String>();
		this.lessEvents = new Hashtable<String,Event>();
	}
	
	public void addLessEvent(Event e){
		
		lessEvents.put(e.getId(), e);
	}
	
	public Collection<Event> getLessEvents() {
		
		return lessEvents.values();
	}
	
	public String getId() {
		
		return event;
	}
	
	public boolean isEpsilon() {
		
		return this == epsilon;
	}
	
	public String toString() {
		
		String str = new String("< " + event);
		for (String s : event_vector)
			str = str + ", " + s;
		return str + " >";
	}
}
